package com.fis.hthk.dblinkapi.util;


import com.agileitp.forte.framework.TextData;

import com.ssaglobal.scm.wms.service.baseobjects.EXEDataObject;
import com.ssaglobal.scm.wms.service.exeprocessmanager.TransactionServiceSORemote;

public class WmsWebuiValidationUpdateImpl {
	
	protected static final String internalCaller = "internalCall";
	
	
	
	public static EXEDataObject update(String updateSql, String db_connection, String wmWhseID, String provider) throws Exception
	{				
		try
		{
			TransactionServiceSORemote remote = EJBRemote.getRemote(provider);			
			//System.out.println("\n\n wmWhseID = "+wmWhseID+" db_connection = "+db_connection+"  insertSql = "+insertSql+"\n\n");
			EXEDataObject obj = remote.update(new TextData(wmWhseID),db_connection, new TextData(updateSql), null, true,internalCaller,null);
			//System.out.println("it is in insert ="+insertSql+" datasourceName="+db_connection+" rowCounts="+obj.getRowCount());
			return obj;
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
			throw new Exception(ex.getMessage(), ex);
		}

	}
}
